package com.abe.bathsystem.entity.serial;


import com.google.gson.Gson;

public class SerialDataEntity {
    private byte[] command;
    private byte[] buffer;
    private int size;
    private boolean isTest;

    public boolean isTest() {
        return isTest;
    }

    public void setTest(boolean test) {
        isTest = test;
    }

    public byte[] getCommand() {
        return command;
    }

    public void setCommand(byte[] command) {
        this.command = command;
    }

    public byte[] getBuffer() {
        return buffer;
    }

    public void setBuffer(byte[] buffer) {
        this.buffer = buffer;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public SerialDataEntity(byte[] command, byte[] buffer, int size, boolean isTest) {
        this.command = command;
        this.buffer = buffer;
        this.size = size;
        this.isTest = isTest;
    }

    public String toString() {
        return new Gson().toJson(this);
    }
}
